window.onload = function() {
	check();
}

function check() {
	var tk = window.localStorage.getItem($.base64.btoa('token'));
	var name = window.localStorage.getItem($.base64.btoa('username'));
	if(tk && name) {
		$.ajax({
			url:'http://yyja.maksdu.com/user/checking',
			method:'post',
			data: {
				username:name,
				token:tk
			},
			success:function(data) {
				if(data) {
					console.info("登录状态验证通过");
				} else
					window.location.href='index.html';
			}
		});
	} else
		window.location.href='index.html';
}
